import request from '@/utils/request'

//风险管控操作
export function riskControlMeasures(data, type) {
    return request({
        url: '/business/riskControlMeasures',
        method: type,
        data: data
    })
}
//风险管控列表
export function riskControlMeasuresList(data) {
    return request({
        url: '/business/riskControlMeasures/list',
        method: 'get',
        params: data
    })
}
//风险管控详情
export function riskControlMeasuresInfo(id) {
    return request({
        url: "/business/riskControlMeasures/" + id,
        method: 'get',
    })
}

//危险源操作
export function dangerousSource(data, type) {
    return request({
        url: '/business/dangerousSource',
        method: type,
        data: data
    })
}
//危险源列表
export function dangerousSourceList(data) {
    return request({
        url: '/business/dangerousSource/list',
        method: 'get',
        params: data
    })
}
//危险源详情
export function dangerousSourceInfo(id) {
    return request({
        url: `/business/dangerousSource/${id}`,
        method: 'get',
    })
}

//风险识别计划操作
export function riskIdentifyPlan(data, type) {
    return request({
        url: '/business/riskIdentifyPlan',
        method: type,
        data: data
    })
}
//风险识别计划列表
export function riskIdentifyPlanList(data) {
    return request({
        url: '/business/riskIdentifyPlan/list',
        method: 'get',
        params: data
    })
}
//风险识别计划详情
export function riskIdentifyPlanInfo(id) {
    return request({
        url: `/business/riskIdentifyPlan/${id}`,
        method: 'get',
    })
}

// 项目点风险点操作
export function delProjectPointRisk(data,type) {
    return request({
        url:"/business/projectPointRisk",
        method:type,
        data:data
    })
}

// 项目点风险点-风险评估操作 -保存
export function projectPointRiskRiskDynamicEval(data,type) {
    return request({
        url:"/business/projectPointRisk/riskDynamicEval",
        method:type,
        data:data
    })
}

// 项目点风险点-风险评估操作 -获取值
export function projectPointRiskLevelCalc(data) {
    return request({
        url:"/business/projectPointRisk/riskLevelCalc",
        method: 'post',
        data:data
    })
}
// 项目点风险点-管控措施操作
export function projectPointRiskRiskControlMeasures(data,type) {
    return request({
        url:"/business/projectPointRisk/riskControlMeasures",
        method:type,
        data:data
    })
}

// 获取项目点风险点详细
export function getProjectPointRisk(id){
    return request({
        url:"/business/projectPointRisk/" + id,
        method:"get"
    })
}

// 获取项目点风险点列表
export function listProjectPointRisk(query){
    return request({
        url:"business/projectPointRisk/list",
        method:"get",
        params:query
    })
}



//风险识别任务操作
export function riskIdentifyTask(data, type) {
    return request({
        url: '/business/riskIdentifyTask',
        method: type,
        data: data
    })
}
//风险识别任务列表
export function riskIdentifyTaskList(data) {
    return request({
        url: '/business/riskIdentifyTask/list',
        method: 'get',
        params: data
    })
}
//风险识别任务详情
export function riskIdentifyTaskInfo(id) {
    return request({
        url: `/business/riskIdentifyTask/${id}`,
        method: 'get',
    })
}
//风险识别任务完成
export function riskIdentifyTaskFinish(data) {
    return request({
        url: '/business/riskIdentifyTask/finish',
        method: 'post',
        data: data
    })
}
//风险识别任务推送
export function riskIdentifyTaskPush(data) {
    return request({
        url: '/business/riskIdentifyTask/push',
        method: 'post',
        data: data
    })
}

//项目点图片(四色图)操作
export function projectPointPic(data, type) {
    return request({
        url: '/business/projectPointPic',
        method: type,
        data: data
    })
}
//项目点图片(四色图)列表
export function projectPointPicList(data) {
    return request({
        url: '/business/projectPointPic/list',
        method: 'get',
        params: data
    })
}
//项目点图片(四色图)详情
export function projectPointPicInfo(id) {
    return request({
        url: `/business/projectPointPic/${id}`,
        method: 'get',
    })
}